#!/bin/bash

#This script is part of svn-scripts. It is licensed under the GNU GENERAL PUBLIC LICENSE Version 2.
#Check the LICENSE.TXT file included with svn-scripts or check http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt for details.

#Apply all diff and patch files in a folder to a subversion repository.
#Must be executed at the root of the subversion repository.
if test -z "$1"
then
	echo "Syntax: svnapplyfolder <route to diff / patch folder>";
else
	diff_files=`ls $1/*.diff`;
	for file in $diff_files;
		do svnpatch $file;
	done
	patch_files=`ls $1/*.patch`;
	for file in $patch_files;
		do svnpatch $file;
	done
fi
